package com.wuba.rxjavademo.lyz.day0505;

import com.wuba.rxjavademo.lyz.BaseDemo;

import rx.Observable;

/**
 * Created by liyaxing on 2016/5/9.
 */
public class Demo03 extends BaseDemo {

    public static void main(String[] ss){
        // observer will receive the "one", "two" and "three" events, but not "zero"
//        BehaviorSubject<Object> subject = BehaviorSubject.create("default");
//        subject.onNext("zero");
//        subject.onNext("one");
//        subject.subscribe(o -> print(o));
//        subject.onNext("two");
//        subject.onNext("three");

        Observable<Integer> observable = Observable.just(1,2,3,4,5,6,7,8).filter(integer -> integer > 5) ;
        observable.subscribe(integer -> print(integer)) ;
    }


}
